package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.entity.ConfirmOrderEntity;
import com.project.entity.PromotionEntity;
import com.project.mapper.IConfirmGoodsMapper;
import com.project.mapper.IConfirmOrderMapper;
import com.project.service.IConfirmOrderService;
import com.project.service.IPromotionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 中标确认单
 */
@RestController
@RequestMapping("confirmOrder")
public class ConfirmOrderController {

    @Autowired
    private IConfirmOrderService confirmOrderService;


    /**
     * 查询所有中标确认单，按状态 ，confirm  0，未确认 1， 已确认
     */
    @RequestMapping("findByItem")
    public IPage<ConfirmOrderEntity> findByItem(Integer pageNO, int pageSize , int confirm) {
        return confirmOrderService.findByItem(pageNO,pageSize,confirm);
    }

    /**
        查找中标确认单详情 包含商品
     */
    @RequestMapping("findById")
    public ConfirmOrderEntity findById(Integer confirmRef) {
        return confirmOrderService.findById(confirmRef);
    }


}
